package TestClasses;

import java.util.ArrayList;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import ModelLayer.*;
import DBLayer.*;

public class DBRangeTest {
	
	DBRange dbr = new DBRange();

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testGetAllRanges() {
		ArrayList<Range> r = dbr.getAllRanges(false);
	    System.out.println(r.size());
	}

	@Test
	public void testFindRange() {
		Range r = dbr.findRange(1, true);
		System.out.println(r.getRangeName());
	}

	@Test
	public void testSearchRangeName() {
		Range r = dbr.searchRangeName("Denims");
		System.out.println(r.getRangeName());
	}

/*	@Test
	public void testInsertRange() throws Exception {
		Range rObj = new Range(7, "Western Porn");
		dbr.insertRange(rObj);
	}*/

/*	@Test
	public void testUpdateRange() throws Exception{
		Range rObj = new Range(33, "Western Porn Magazines");
		dbr.updateRange(rObj);
	}*/

/*	@Test
	public void testDeleteRange() {
		dbr.deleteRange(33);
		ArrayList<Range> ranges = dbr.getAllRanges(false);
		System.out.println(ranges.size());
	}
*/
}
